package cn.zhaoyuening.hadoopdemo.rpc;

import cn.zhaoyuening.hadoopdemo.utils.ConfigureFactory;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.ipc.RPC;

import java.io.IOException;

public class RpcServer {
    public static void main(String[] args) throws IOException {
        Configuration configuration = ConfigureFactory.getConfiguration();
        RPC.Builder builder = new RPC.Builder(configuration);
        builder.setBindAddress("localhost").setPort(8088).setProtocol(LoginService.class).setInstance(new LoginServiceImpl());
        builder.build().start();
    }
}
